package com.zzjson.thread.executors;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2019 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : com.zzjson.thread.executors</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2019年09月19日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
public class ExecutorsDemo implements Runnable {

	static ExecutorService executorService = Executors.newFixedThreadPool(3);

	public static void main(String[] args) {
		for (int i = 0; i < 100; i++) {
			executorService.execute(new ExecutorsDemo());
		}
	}

	@Override
	public void run() {
		System.out.println(Thread.currentThread().getName() + "do something");
	}
}

